package com.ecmap.hongyun.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 
 * @className:News.java
 * @classDescription:新闻动态
 * @author: DANIEL DENG
 * @createTime: 2013-6-29
 *
 */
@Entity
@Table(name = "t_news", catalog = "hongyun")
public class News implements java.io.Serializable {

	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -821558035849312381L;
	
	// Fields

	private Long id;
	private String title;
	private String summary;
	private String content;
	private Integer newsStatus;
	private Date newsTime;
	private Date createTime;
	private Date updateTime;

	// Constructors

	/** default constructor */
	public News() {
	}

	/** full constructor */
	public News(String title, String summary, String content,
			Integer newsStatus, Date newsTime, Date createTime, Date updateTime) {
		this.title = title;
		this.summary = summary;
		this.content = content;
		this.newsStatus = newsStatus;
		this.newsTime = newsTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "TITLE", length = 128)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "SUMMARY", length = 1024)
	public String getSummary() {
		return this.summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	@Column(name = "CONTENT", length = 65535)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "NEWS_STATUS")
	public Integer getNewsStatus() {
		return this.newsStatus;
	}

	public void setNewsStatus(Integer newsStatus) {
		this.newsStatus = newsStatus;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "NEWS_TIME", length = 10)
	public Date getNewsTime() {
		return this.newsTime;
	}

	public void setNewsTime(Date newsTime) {
		this.newsTime = newsTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATE_TIME", length = 10)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "UPDATE_TIME", length = 10)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

}